<script setup lang="ts">
import ByIcon from "./ByIcon.vue";

const { circle = true } = defineProps<{
  size?: number;
  circle?: boolean;
  bgColor?: string;
  icon?: string;
  iconSize?: string | number;
  iconColor?: string;
}>();
</script>

<template>
  <view
    class="flex-none flex-center"
    :class="circle ? 'rounded-full' : 'rounded-lg'"
    :style="{ width: size + 'rpx', height: size + 'rpx' }"
  >
    <slot>
      <ByIcon v-if="icon" :name="icon" :size="iconSize" :color="iconColor" />
    </slot>
  </view>
</template>
